package player

import (
	"server/msg/jsonData"
)

func CreatePlayer(playerReq *jsonData.MsgCreatePlayerReq) (Player, error) {
	logic := NewPlayerLogic()
	return logic.createPlayer(playerReq)
}
func GetPlayerInfoHandler(platformId string) (Player, error) {
	logic := NewPlayerLogic()
	return logic.getPlayerInfo(platformId)
}

func GetPlayerInfoByUid(userId string) (Player, error) {
	logic := NewPlayerLogic()
	return logic.getPlayerFromDatabase(userId, "uid")
}

func UnLock(userId string, sid int) (Player, error) {
	logic := NewPlayerLogic()
	return logic.unLock(userId, sid)
}

func UpPlayerLevel(uid string) (map[string]interface{}, error) {
	logic := NewPlayerLogic()
	return logic.upPlayerLevel(uid)
}
func GetUserZhuanSun(uid string) int32 {
	return 100
}

func AddUserCoins(userId string, coins int) {
	logic := NewPlayerLogic()
	logic.AddUserCoins(userId, coins)
}
